from Components.Component import Component

class StackPushToStatusStack(Component):

    def __call__(self, values):
    
        assert 'stack' in values.keys()    # StackPushToStatusStack(Component) needs 'stack' to run 
        a = values['stack'].pop()      # StackPushToStatusStack(Component) needs 'stack' value to run
    
        if 'status_stack' not in values.keys():
            values['status_stack'] = []
       
        values['status_stack'].append(a)
                    
        return (([self.get_connection()], values),)
